package com.lyf.core.service;

import com.lyf.core.pojo.User;
import com.lyf.core.pojo.model.PageModel;
import com.lyf.core.util.CommonUtils;
 
public interface UserService {
	
		final static String SUPER_ADMIN_ID = "super_admin" ;
		final static String SUPER_ADMIN_PASS = CommonUtils.md5(SUPER_ADMIN_ID, "123");// "123" ;
		
		public String save(User u) ;
		
		public void deleteUser(int uid);
		
		public String update(User user);
		
		public User findById(int uid) ;
		
		public User findByUserId(String user_id) ;
		 
		/**
		 * 更新用户密码
		 * @param user_id
		 * @param newpass
		 * @return
		 */
		public boolean updateUserPass(int uid ,String oldpass , String newpass);
		
 
		/**
		 * 用户重置密码
		 * @param user_id
		 * @param pass
		 */
		public boolean restPass(int uid , String pass) ;
 
		
		/**
		 * 查找用户信息
		 * @param dept_id 归属部门ID
		 * @param key 关键字
		 * @param rows 每页数量
		 * @param page 页
		 * @return
		 */
		public PageModel<User> findUsers(Integer dept_id , String key , int rows , int page);
		 
	 
		 
	
}
